﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Pay.DTO {
    /// <summary>
    /// 基本请求报文
    /// </summary>
    [Serializable]
    public class t_head_req {
        public t_head_req() {
            timestamp = DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss");
            nonce = DtoHelper.RandCode(10);
        }
        /// <summary>
        /// 请求时间：yyyy-MM-dd hh:mm:ss
        /// </summary>
        public string timestamp { get; set; }
        /// <summary>
        /// 10位随机数字
        /// </summary>
        public string nonce { get; set; }
        /// <summary>
        /// 商户号
        /// </summary>
        public string merchant_no {
            get {
                return t_RequestMethod.merchant_no;
            }
        }
        /// <summary>
        /// 进件商户号
        /// </summary>
        public string bind_no { get; set; }
        /// <summary>
        /// 方法名称
        /// </summary>
        public string method { get; set; }
        /// <summary>
        /// 签名
        /// </summary>
        public string sign { get; set; }
    }

    /// <summary>
    /// 基本分页请求
    /// </summary>
    [Serializable]
    public class t_head_page_req : t_head_req {
        public t_head_page_req() {
            page = 1;
            size = 20;
        }
        /// <summary>
        /// 当前分页
        /// </summary>
        public int page { get; set; }
        /// <summary>
        /// 每页N条，默认10条
        /// </summary>
        public int size { get; set; }
    }
}
